﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.PresentationFramework;
using Caliburn.PresentationFramework.Screens;
using Caliburn.Core.InversionOfControl;

namespace MTGenome.ViewModels
{
    public abstract class HaveSubject<T> : PropertyChangedBase, IHaveSubject<T>
    {
        #region IHaveSubject<T> Members

        public T Subject
        {
            get;
            private set;
        }

        public virtual IHaveSubject<T> WithSubject(T subject)
        {
            Subject = subject;
            return this;
        }

        #endregion

        #region IHaveSubject Members

        object IHaveSubject.Subject
        {
            get { return Subject; }
        }

        public IHaveSubject WithSubject(object subject)
        {
            return WithSubject((T)subject);
        }

        #endregion
    }
}
